<!DOCTYPE HTML>
<html class="no-js">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>{{ $configuration['site_title'] }} | @yield('title')</title>

    <!-- 通过自有函数输出HTML头部信息 -->
    <meta name="description" content="{{ $configuration['site_description'] }}"/>
    <meta name="keywords" content="{{ $configuration['site_keywords'] }}"/>
    <link rel="stylesheet" type="text/css" href="/static/home/css/default.css"/>
    <link rel="stylesheet" href="/static/home/css/layui.css">
    <link rel="stylesheet" href="/static/home/css/style.css">
    <script src="/static/home/js/layui.js"></script>
    <script src="/static/home/js/main.js"></script>
    <style>
        .layui-container {
            margin-top: 70px;
        }

        .timeline-menu-fixed {
            top: 70px;
        }

        .timeline-header h2 {
            margin-top: -70px;
            padding-top: 70px;
        }

        .header .layui-nav .layui-nav-item .layui-nav-child a {
            color: #212220;
        }
    </style>

    <!-- Global site tag (gtag.js) - Google Analytics -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=G-MW5497H71R"></script>
    <script>
        window.dataLayer = window.dataLayer || [];

        function gtag() {
            dataLayer.push(arguments);
        }

        gtag('js', new Date());

        gtag('config', 'G-MW5497H71R');
    </script>
</head>
<body>

<div class="layui-header header">
    <div class="layui-main">
        <a class="logo" href="/">{{ $configuration['site_title'] }}</a>

        <ul class="layui-nav">
            @foreach($categorys as $categoryCom)
                <li class="layui-nav-item layui-hide-xs ">
                    <a href="{{ url("/category/$categoryCom->id") }}"
                       title="{{ $categoryCom->name }}">{{ $categoryCom->name }}</a>
                </li>
            @endforeach

            <li class="search layui-hide-xs ">
                <form action="{{ route('search') }}" id="search" method="get">
                    <input type="text" name="search" value="" placeholder="请输入关键字...">
                </form>
            </li>
            @if(auth()->guard('member')->check())
                <li class="layui-nav-item layui-hide-xs">
                    <a href="{{ url('/logout') }}" title="退出登录">退出登录</a>
                </li>
            @else
                <li class="layui-nav-item layui-hide-xs">
                    <a href="{{ url('/loginForm') }}" title="登录">登录</a>
                </li>
                <li class="layui-nav-item layui-hide-xs">
                    <a href="{{ url('/registerForm') }}" title="注册">注册</a>
                </li>
            @endif
            <li class="layui-nav-item nav-btn layui-hide-sm">
                <a href="javascript:;"><i class='layui-icon layui-icon-app' style='font-size: 25px'></i></a>
                <dl class="layui-nav-child">
                    @foreach($categorys as $categoryCom)
                        <dd><a href="{{ url("/category/$categoryCom->id") }}">{{ $categoryCom->name }}</a></dd>
                    @endforeach
                    @if(auth()->guard('member')->check())
                        <dd><a href="{{ url("/logout") }}">退出登录</a></dd>
                    @else
                        <dd><a href="{{ url("/registerForm") }}">注册</a></dd>
                        <dd><a href="{{ url("/loginForm") }}">登录</a></dd>
                    @endif
                </dl>
            </li>
        </ul>
    </div>
</div>